Image processing method and apparatus, electronic device, and storage medium

ABSTRACT

Embodiments of this application provide an image processing method and apparatus, an electronic device, and a storage medium. The method includes: acquiring a first sequence of images and motion vector data corresponding to each frame of image in the first sequence of images; generating, based on the motion vector data, the first sequence of images, and a slowdown multiple, an insertion image that correspondences to the slowdown multiple, a quantity of insertion images corresponding to the slowdown multiple; inserting the insertion image into a play sequence of the first sequence of images to obtain a second sequence of images; and playing the second sequence of images.

RELATED APPLICATIONS

This application is a continuation application of PCT Application No.PCT/CN2020/125078, filed on Oct. 30, 2020, which claims priority toChinese Patent Application No. 202010028338.3 entitled “IMAGE PROCESSINGMETHOD AND APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM,” and filedon Jan. 10, 2020. The two applications are both incorporated byreference in their entirety.

FIELD OF THE TECHNOLOGY

This application relates to the field of image processing technologies,and to an image processing method and apparatus, an electronic device,and a storage medium.

BACKGROUND OF THE DISCLOSURE

With increasingly high requirements of game users, more video games aredeveloped following the trend of increasingly high-definition pictureperformance and more realistic light and shadow performance.

However, in a related dynamic effect display process, to improve dynamiceffect performance capability, more picture content needs to be createdin advance by using a development tool, resulting in high productioncosts. Because the picture content needs to be developed, developmentdifficulty is increased, and development efficiency is reduced.

SUMMARY

Embodiments of the present disclosure provide an image processingmethod. The method includes: acquiring a first sequence of images andmotion vector data corresponding to each frame of image in the firstsequence of images; generating, based on the motion vector data, thefirst sequence of images, and a slowdown multiple, an insertion imagethat matches the slowdown multiple, a quantity of insertion imagescorresponding to the slowdown multiple; inserting the insertion imageinto a play sequence of the first sequence of images to obtain a secondsequence of images; and playing the second sequence of images.

Embodiments of the present disclosure provide an image processingapparatus. The apparatus includes: a data acquiring unit, configured toacquire a first sequence of images and motion vector data correspondingto each frame of image in the first sequence of images; an imagegeneration unit, configured to generate, based on the motion vectordata, the first sequence of images, and a slowdown multiple, aninsertion image that matches the slowdown multiple, a quantity ofinsertion images corresponding to the slowdown multiple; an imageconfiguration unit, configured to insert the insertion image into a playsequence of the first sequence of images to obtain a second sequence ofimages; and an image play unit, configured to play the second sequenceof images.

Embodiments of the present disclosure provide an electronic device,including a processor and a memory; one or more programs being stored inthe memory and configured to be executed by the processor to implementthe foregoing method.

Embodiments of the present disclosure provide a non-transitorycomputer-readable storage medium, storing program code, when run by aprocessor, performing the foregoing method.

According to the image processing method and apparatus, the electronicdevice, and the storage medium provided in this application, aninsertion image that corresponds to a slowdown multiple is generatedbased on motion vector data, a first sequence of images, and theslowdown multiple, and is inserted into a play sequence of the firstsequence of images, thereby implementing dynamic generation of theinsertion image based on the slowdown multiple and the motion vectordata, reducing production costs and shortening time for dynamic effectproduction, and improving development efficiency.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a motion vector according to anembodiment of this application.

FIG. 2 is a schematic diagram of a motion vector according to anembodiment of this application.

FIG. 3 is a schematic diagram of object movement according to anembodiment of this application.

FIG. 4 is a flowchart of an image processing method according to anembodiment of this application.

FIG. 5 is a schematic diagram of inserting an insertion image into aplay sequence in the embodiment shown in FIG. 4.

FIG. 6 is a schematic diagram of a second sequence of images in theembodiment shown in FIG. 4.

FIG. 7 is a flowchart of an image processing method according to anembodiment of this application.

FIG. 8 is a flowchart of an implementation of S220 in the imageprocessing method provided in FIG. 7.

FIG. 9 is a schematic diagram of reference motion vector data accordingto an embodiment of this application.

FIG. 10 is a schematic diagram of a basic image and a motion vector mapaccording to an embodiment of this application.

FIG. 11 is a schematic diagram corresponding to a pixel according to anembodiment of this application.

FIG. 12 is a flowchart of an implementation of S230 in the imageprocessing method provided in FIG. 7.

FIG. 13 is a schematic diagram of generating an insertion image from twoadjacent images in an image processing method according to an embodimentof this application.

FIG. 14 is a schematic diagram of reference motion vector datacorresponding to an insertion image in an image processing methodaccording to an embodiment of this application.

FIG. 15 is a flowchart of an image processing method according to anembodiment of this application.

FIG. 16 is a schematic diagram of a configuration interface according toan embodiment of this application.

FIG. 17 is a flowchart of an image processing method according to anembodiment of this application.

FIG. 18 is a flowchart of an image processing method according to anembodiment of this application.

FIG. 19 is a schematic diagram of an explosion effect in a game sceneaccording to an embodiment of this application.

FIG. 20 is a schematic diagram of effect comparison before and afterexplosion effect processing in a game scene according to an embodimentof this application.

FIG. 21 is a comparison effect diagram of the quantity of images thatneed to be produced in an image processing method according to anembodiment of this application and a related technology.

FIG. 22 is a structural block diagram of an image processing apparatusaccording to an embodiment of this application.

FIG. 23 is a structural block diagram of an image processing apparatusaccording to an embodiment of this application.

FIG. 24 is a structural block diagram of an image processing apparatusaccording to an embodiment of this application.

FIG. 25 is a structural block diagram of an image processing apparatusaccording to an embodiment of this application.

FIG. 26 is a structural block diagram of an electronic device accordingto this application used for performing an image processing methodaccording to an embodiment of this application.

FIG. 27 shows a storage unit that is used for storing or carry programcode for implementing an image processing method according to anembodiment of this application.

DESCRIPTION OF EMBODIMENTS

The technical solutions in the embodiments of this application areclearly and completely described in the following with reference to theaccompanying drawings in the embodiments of this application.Apparently, the described embodiments are merely some rather than all ofthe embodiments of this application. All other embodiments obtained bypersons of ordinary skill in the art based on the embodiments of thisapplication without creative efforts shall fall within the protectionscope of this application.

Before the embodiments of this application are further described indetail, a description is made on nouns and terms involved in theembodiments of this application, and the nouns and terms involved in theembodiments of this application are applicable to the followingexplanations.

Slowdown multiple: represents a multiple of extending play duration of adynamic effect. For example, if the slowdown multiple is 2, it indicatesthat the play duration of the dynamic effect needs to be extended by twotimes. For example, if original play duration of the dynamic effect is 2seconds, when the slowdown multiple is 2, the play duration iscorrespondingly extended to 4 seconds, and when the slowdown multiple is5, the corresponding play duration is extended to 10 seconds.

Motion vector: represents a displacement of a target pixel in an image.The target pixel may be any pixel in the image, or may be a pixel in acontent block in the image.

As shown in FIG. 1, if a target pixel is a pixel in an image, and it isassumed that a pixel 10 is the target pixel, a location of the pixel 10in an image 20 of a previous frame in FIG. 1 is (a, b), and a locationof the pixel 10 in an image 30 of a next frame is (c, d), a motionvector corresponding to the pixel 10 in the image of the next frame is(dx, dy), where dx represents a displacement of the pixel 10 in an Xaxis direction, and dy represents a displacement of the pixel 10 in a Yaxis direction. Therefore, in the case shown in FIG. 1, dx=a−c, anddy=d−b.

As shown in FIG. 2, if a target pixel is a pixel in a content block, amotion vector represents a displacement between the content block and abest match block, and the best match block refers to a content block 31in a next frame of image 30 that has a highest matching degree with acontent block 21 of a previous frame of image 20. The content block mayinclude multiple pixels. In this embodiment, a pixel displacement of acentral point of the content block may be used as a displacement of thecontent block. The central point may be a geometric center. In contentshown in FIG. 2, a pixel location of a central point of the contentblock 21 is (a, b), and a pixel location of a central point of the bestmatch block 31 is (c, d), so that a motion vector between the contentblock and the best match block is (a−c, d−b).

The content block may be understood as representing an area with anentity meaning in the image. For example, if the image contains aperson, the head of the person is an area with an entity meaning, andthe entity meaning is that image content of the area represents the headof the person, so that the header area may be used as a content block.For another example, a hand of the person is also an area with an entitymeaning, and the hand area may be used as a content block.

The target pixel in this embodiment may be understood as each pixel inthe image, or may be understood as a pixel in the content block in theforegoing content. Motion vector data involved in this embodimentrepresents data that carries a motion vector, and the data may be in atext format or a picture format.

As a user has an increasingly high requirement for visual experience,image display of a virtual scene develops in a direction of clearer andmore realistic. For example, in a video game scene, a variety of gamecharacters and game special effects are displayed more visually.

High production costs are required for a dynamic effect involved in somevirtual scenes. For example, a key frame is produced, or a sequence ofimages needs to be produced to implement a required dynamic effect.

Regarding the key frame, the key frame is equivalent to an originalpicture in a dynamic effect, and refers to a frame in which a key actionin motion or change of an object is located. Regarding the sequence ofimages, a dynamic effect to be displayed is decomposed, and the dynamiceffect is further decomposed into multiple actions. Each action may beused as one frame of image, and then images corresponding to one actionare combined into a sequence of images. In a process of playing thesequence of images, a dynamic effect corresponding to the sequence ofimages can be displayed.

However, to implement the required dynamic effect, a developer needs toproduce each frame of image in the dynamic effect by using a developmenttool in an earlier stage, thereby causing high production costs. Forexample, a dynamic effect of a super slow action type has a higher framerate (the quantity of frames displayed per second) than a dynamic effectof an ordinary action type. For example, the frame rate of the dynamiceffect of the ordinary action type is 30 fps, and the frame rate of thedynamic effect of the super slow action type may be 240 fps or evenhigher. 30 fps represents that 30 frames of images are played persecond, and 240 fps represents that 240 frames of images are played persecond. When an initial dynamic effect is a dynamic effect of a commontype, and a dynamic effect of a super slow action type needs to beimplemented by slowing down based on the dynamic effect of the commontype, a developer needs to produce more images and insert them into animage sequence of the common dynamic effect, so as to adapt to anincrease in a frame rate.

In addition, if an adjustment (for example, an adjustment of playduration) needs to be performed on a dynamic effect that has beencompleted, a problem of reproduction is involved, and production costsare further increased. For example, when play duration is 2 seconds anda dynamic effect of 60 frames of images is included, if play needs to beslowed down by 5 times (which may be understood as extending playduration by 5 times), and an original visual effect needs to bemaintained, a total of 300 frames of images are required, which meansthat 240 frames of images need to be reproduced, thereby causing largeproduction costs.

In addition, an image produced in advance is stored in a resource file.After the resource file is stored in a terminal device used by a user,the resource file occupies more storage space of the terminal device,and utilization of storage space is reduced.

Using the image processing method and apparatus, the electronic device,and the computer-readable storage medium that are provided in theembodiments of this application, after an original sequence of imageshas been obtained by using a development tool, when a dynamic effectrepresented by the original sequence of images needs to be slowed down,and a visual effect needs to be maintained or a better visual effectneeds to be obtained, an insertion image may be obtained by using motionvector data corresponding to each frame of image in the originalsequence of images obtained during production, and inserted into a playsequence of the original sequence of images, so as to obtain a sequenceof images including more images and dynamically generate an insertionimage according to a slowdown multiple and motion vector data. Inaddition, the development tool no longer needs to be used for producingmore images for insertion into the original sequence of images, therebyreducing production costs and shortening production time of the dynamiceffect.

The image processing method provided in the embodiments of thisapplication may be implemented by a terminal/server alone; or may beimplemented by the terminal and the server through cooperation. Forexample, when collecting a request for slowing down play of a firstsequence of images (including a slowdown multiple), the terminalindependently undertakes the image processing method described below toobtain a second sequence of images and play the second sequence ofimages. The terminal collects a request for slowing down play of a firstsequence of images (including a slowdown multiple), and sends therequest to the server. After receiving the request, the server performsthe image processing method to obtain a second sequence of images, andsends the second sequence of images to the terminal, so as to play thesecond sequence of images.

The electronic device provided by the embodiments of this applicationfor implementing the image processing method described below may bevarious types of terminal devices or servers. The server may be anindependent physical server, or may be a server cluster or a distributedsystem including a plurality of physical servers, or may be a cloudserver that provides cloud computing services. The terminal may be asmartphone, a tablet computer, a notebook computer, a desktop computer,a smart speaker, a smartwatch, or the like, but is not limited thereto.The terminal and the server may be directly or indirectly connected in awired or wireless communication manner. This is not limited by thedescription of this application.

The following further describes the solution principles involved in theembodiments of this application.

As shown in FIG. 3, a process in which an object moves from one end of apicture to another end is represented by using a sequence of images asan example for description. It may also be seen from FIG. 3 that anobject 32 passes through multiple locations in a moving process. Forexample, the object 32 starts to move from a first location and reachesa fourth location after passing through a second location and a thirdlocation. A picture of the object 32 at each location may be representedby using one frame of image, which may be further understood as thateach frame of image in the sequence of images represents one location ofthe object. For example, the sequence of images includes four frames ofimages, where the first frame of image corresponds to a picture at thefirst location, the second frame of image corresponds to a picture atthe second location, the third frame of image corresponds to a pictureat the third location, and the fourth frame of image corresponds to apicture at the fourth location.

In this case, a pixel that represents the object in each frame of imagemay be used as a target pixel. Therefore, in the moving process, theobject in each frame of image may be considered as the target pixel ineach frame of image. For example, a target pixel 33 (a pixelrepresenting the object 32) in FIG. 3 is used as an example. In themoving process of the object 32 from the first location to the fourthlocation, it may be considered that the target pixel 33 moves from thefirst location to the fourth location.

In this embodiment, by using the foregoing features, a new image may begenerated as an insertion image by acquiring a motion vector of a targetpixel, so as to resolve the foregoing technical problem.

The following describes the embodiments of this application in detailwith reference to the accompanying drawings.

FIG. 4 is a flowchart of an image processing method according to anembodiment of this application. The method includes the following steps:

S110. Acquire a first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of images.

In this embodiment, the first sequence of images may be understood as asequence of images that represents a target dynamic effect. The firstsequence of images may include multiple frames of images. When themultiple frames of images are drawn to an image display interface fordisplay, the target dynamic effect may be displayed on the image displayinterface. In this embodiment, the first sequence of images is a basisfor subsequently generating a new image. In one example, the firstsequence of images may be obtained by a developer by using a developmenttool.

Motion vector data corresponding to each frame of image in the firstsequence of images represents a displacement of a target pixel in acorresponding image with respect to a corresponding pixel in an adjacentimage, or a displacement of a content block in a corresponding imagewith respect to a best match block in an adjacent image. The adjacentimage may be a previous frame of image adjacent to the correspondingimage, or may be a next frame of image adjacent to the correspondingimage.

For example, if the first sequence of images includes a first frame ofimage, a second frame of image, a third frame of image, and a fourthframe of image, when the motion vector data represents the displacementof the target pixel in each frame of image with respect to thecorresponding pixel in the previous frame of image, the motion vectordata corresponding to the first frame of image is all 0, because thetarget pixel in the first frame of image is not moved yet, and nodisplacement is generated. Motion vector data corresponding to thesecond frame of image may represent a displacement of a location of thetarget pixel in the second frame of image with respect to a location ofa corresponding pixel in the first frame of image. Similarly, motionvector data corresponding to the third frame of image may represent adisplacement of a location of the target pixel in the third frame ofimage with respect to a location of a corresponding pixel in the secondframe of image, and motion vector data corresponding to the fourth frameof image may represent a displacement of a location of the target pixelin the fourth frame of image with respect to a location of acorresponding pixel in the third frame of image.

S120. Generate, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that matches theslowdown multiple. A quantity of insertion images corresponds to theslowdown multiple.

As is known from the foregoing content, the first sequence of images mayrepresent a dynamic effect in a display process. In this embodiment, theslowdown multiple may be understood as a multiple of slowing down thedynamic effect represented by the first sequence of images, or may beunderstood as a multiple of extending play duration of the dynamiceffect represented by the first sequence of images.

For example, if the play duration of the dynamic effect represented bythe first sequence of images in the display process is 2 seconds, whenthe slowdown multiple is 2, the dynamic effect represented by the firstsequence of images needs to be slowed down by 2 times, that is, the playduration is extended from 2 seconds to 2×2=4 seconds. For anotherexample, if the play duration of the dynamic effect represented by thefirst sequence of images in the display process is 4 seconds, when theslowdown multiple is 3, the dynamic effect represented by the firstsequence of images needs to be slowed down by 3 times, that is, the playduration of the dynamic effect is extended from 4 seconds to 4×3=12seconds.

In the play process of the dynamic effect, a frame rate is a factor thataffects user visual experience. The frame rate may be understood as thequantity of frames of images played per second, or may be understood asthe quantity of frames of images refreshed per second. A smooth andvivid animation may be obtained with a high frame rate. When the playduration of the dynamic effect represented by the first sequence ofimages is extended, if the quantity of frames of images in the firstsequence of images is not increased at the same time, the quantity offrames played per second is reduced, thereby causing a sense of lag.

For example, if a total of 60 frames of images are included in theoriginal first sequence of images, and the play duration is 2 seconds, acorresponding frame rate is 30 fps (the quantity of frames displayed persecond). When the slowdown multiple is 4, the corresponding playduration is extended to 8 seconds, and when no new image is inserted,the corresponding frame rate becomes 7.5 fps. Therefore, to achieve atechnical effect that the first sequence of images can still maintainthe visual effect while being slowed down to play, a new image may begenerated as an insertion image based on the motion vector data, thefirst sequence of images, and the slowdown multiple, and the insertionimage is inserted into the first sequence of images.

In one example, in a process of generating the insertion image, motionvector data of the to-be-generated insertion image may be first acquiredas reference motion vector data. It may be understood that the referencemotion vector data represents a displacement of the target pixel in acorresponding image with respect to a frame of image in the firstsequence of images, or represents a displacement of the target pixel ina corresponding image with respect to an insertion image generatedfirst. Therefore, after the reference motion vector data is generated,the target pixel may be moved according to the generated referencemotion vector data, so as to generate the insertion image.

For a different slowdown multiple, extended play duration correspondingto the dynamic effect is different, and the quantity of insertion imagesto be generated and to be inserted into the first sequence of images isalso different. Therefore, the quantity of generated insertion imagesneeds to match the slowdown multiple, so as to correspond to thedifferent slowdown multiple. As such, the original visual effect can bemaintained, and even the original visual effect can be improved.

S130. Insert the insertion image into a play sequence of the firstsequence of images to obtain a second sequence of images.

After the insertion image is generated, a play location corresponding toeach insertion image may be configured. Inserting the insertion imageinto the play sequence of the first sequence of images may be understoodas configuring the play location corresponding to each insertion imagein the play sequence of the original first sequence of images, so as toobtain the second sequence of images. It may be understood that, in thisembodiment, each play location represents a time sequence location thatis played in the play sequence. For example, if the play locationcorresponding to the insertion image is between the first frame of imageand the second frame of image in the first sequence of images, it meansthat in a subsequent display process, the first frame of image is playedfirst, then the insertion image is played, and then the second frame ofimage is played.

For example, as shown in FIG. 5, that a first sequence of images 40 aincludes six frames of images is used as an example. When there are sixframes of images, one frame of image may be separately inserted betweenevery two adjacent frames of images, that is, a total of five frames ofimages may be inserted. It is assumed that the five frames of insertionimages generated corresponding to the first sequence of images 40 ainclude an insertion image 51, an insertion image 52, an insertion image53, an insertion image 54, and an insertion image 55. In addition, aninsertion location corresponding to each insertion image is a locationindicated by a corresponding arrow, that is, a time sequence locationthat is subsequently played in the play sequence. Further, the obtainedsecond sequence of images may be shown in FIG. 6. In FIG. 6, theinsertion image 51, the insertion image 52, the insertion image 53, theinsertion image 54, and the insertion image 55 shown in FIG. 5 arealready inserted into the generated second sequence of images 40 b.

S140. Play the second sequence of images.

If the generated second sequence of images includes multiple frames ofimages, playing the second sequence of images may be understood assequentially playing the multiple frames of images included in thesecond sequence of images, so as to implement a dynamic effectrepresented by playing of the second sequence of images. For example, inthe second sequence of images 40 b shown in FIG. 6, when the insertionimage 51, the insertion image 52, the insertion image 53, the insertionimage 54, and the insertion image 55 are inserted into the originalfirst sequence of images 40 a, and the second sequence of images 40 b isplayed, the images in the second sequence of images 40 b are played insequence from left to right, so as to display the corresponding dynamiceffect.

According to the image processing method provided in this embodiment,after the first sequence of images and the motion vector data areacquired, the insertion image whose quantity matches the slowdownmultiple is generated based on the motion vector data, the firstsequence of images, and the slowdown multiple, and the insertion imageis inserted into the play sequence of the first sequence of images toobtain the second sequence of images. Therefore, after the firstsequence of images is produced, when the dynamic effect represented bythe first sequence of images needs to be slowed down and the visualeffect needs to be maintained, the insertion image is produced accordingto the motion vector data corresponding to each frame of image in thefirst sequence of images, and inserted into the play sequence of thefirst sequence of images, so as to obtain the second sequence of imagesthat includes more images. In this way, a development tool is notrequired to be used for producing more images to be inserted into thefirst sequence of images, so as to reduce production costs and shortentime for producing the dynamic effect.

FIG. 7 is a flowchart of an image processing method according to anembodiment of this application. The method includes the following steps:

S210. Acquire a first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of images.

S220. Generate, according to the motion vector data and a slowdownmultiple, reference motion vector data that matches the slowdownmultiple. A quantity of reference motion vector data corresponds to theslowdown multiple.

The reference motion vector data refers to motion vector datacorresponding to an insertion image, and may be generated according tothe motion vector data and the slowdown multiple that are correspondingto each frame of image in the first sequence of images, and thensubsequently, the insertion image is generated according to thereference motion vector data.

In this embodiment, the reference motion vector data that matches theslowdown multiple may be generated in multiple ways. Each piece ofreference motion vector data corresponds to one insertion image, thatis, the quantity of reference motion vector data corresponds to thequantity of subsequently generated insertion images.

As shown in FIG. 8, the generating, according to the motion vector dataand a slowdown multiple, reference motion vector data that matches theslowdown multiple may include:

S221. Acquire a target displacement, where the target displacement is adisplacement represented by motion vector data corresponding to a laterdisplayed image in every two adjacent images in the first sequence ofimages.

S222. Acquire a ratio of the target displacement to the slowdownmultiple, obtain a quantity of insertion images between every twoadjacent images according to the slowdown multiple, and use the ratio asreference motion vector data corresponding to the insertion imagesbetween every two adjacent images, to obtain the reference motion vectordata that matches the slowdown multiple.

It is assumed that images included in the first sequence of images are afirst frame of image, a second frame of image, a third frame of image, afourth frame of image, a fifth frame of image, and a sixth frame ofimage, and the reference motion vector data may be generated by usingevery two adjacent images as one interval. In this embodiment, onetarget displacement may be generated for each interval, and is used as atarget displacement corresponding to the interval.

For example, the first frame of image and the second frame of image maybe used as an interval, the second frame of image and the third frame ofimage are used as an interval, the third frame of image and the fourthframe of image are used as an interval, the fourth frame of image andthe fifth frame of image are used as an interval, and the fifth frame ofimage and the sixth frame of image are used as an interval. In theinterval including the first frame of image and the second frame ofimage, a later displayed image is the second frame of image, and atarget displacement corresponding to the interval is a displacementrepresented by motion vector data corresponding to the second frame ofimage. It may be understood that motion vector data corresponding toeach frame of image represents a displacement of a target pixel in eachframe of image, and the target displacement includes a displacement ofeach pixel in the target pixel.

In this case, assuming that a location of a first pixel included in thetarget pixel in the first frame of image is (a1, b1), and a location ofthe first pixel in the second frame of image is (a2, b2), a motionvector of the first pixel in motion vector data corresponding to thesecond frame of image is (a2−a1, b2−b1), a displacement of the firstpixel in an X axis direction is a2−a1, a displacement of the first pixelin a Y axis direction is b2−b1, and the finally calculated targetdisplacement includes the displacement a2−a1 of the first pixel in the Xaxis direction and the displacement b2−b1 of the first pixel in the Yaxis direction. Therefore, the displacement of each pixel included inthe target pixel may be acquired in the foregoing manner, so that thedisplacement represented by the motion vector corresponding to thesecond frame of image is used as the target displacement correspondingto the interval. For example, assuming that the target pixel furtherincludes a second pixel, and a location of the second pixel in the firstframe of image is (c1, d1), and a location of the second pixel in thesecond frame of image is (c2, d2), for the second pixel, a displacementin the X axis is c2−c1, and a displacement in the Y axis is d2−d1. Inthis case, the calculated target displacement includes the displacementa2−a1 of the first pixel in the X axis, the displacement b2−b1 of thefirst pixel in the Y axis, the displacement c2−c1 of the second pixel inthe X axis, and the displacement d2−d1 of the second pixel in the Yaxis.

Movement of each pixel in the first sequence of images is of a certainintegrity. Referring to FIG. 3, in the moving process of the object 32from the first location to the fourth location, except the pixel 33, allpixels constituting the object 32 may be considered as moving togetherfrom the first location to the fourth location. In such a process fromthe first location to the fourth location, a displacement of each pixelconstituting the object 32 is the same. Therefore, a displacement of apixel in the target pixel in the later displayed image may be directlyused as the displacement represented by the motion vector datacorresponding to the later displayed image, so as to obtain the targetdisplacement corresponding to each interval.

For example, the target pixel that includes the first pixel and thesecond pixel is used as an example, and the target pixel is a targetpixel of the first frame of image and the second frame of image. Thecalculated target displacement includes the displacement a2−a1 of thefirst pixel in the X axis direction, the displacement b2−b1 of the firstpixel in the Y axis direction, the displacement c2−c1 of the secondpixel in the X axis direction, and the displacement d2−d1 of the secondpixel in the Y axis direction. When the movement is of certainintegrity, c2−c1 and a2−a1 are the same, and d2−d1 and b2−b1 are thesame, so that the target displacement corresponding to the intervalincluding the first frame of image and the second frame of image isa2−a1 (X axis direction) and b2−b1 (Y axis direction).

As shown in the foregoing content, the quantity of images inserted inevery two adjacent images is related to a current slowdown multiple. Inone example, a larger slowdown multiple corresponding to the playduration of the dynamic effect represented by the first sequence ofimages indicates that the play duration of the dynamic effect is longer,and further more insertion images need to be generated.

In this embodiment, after the target displacement corresponding to eachinterval is obtained, reference motion vector data corresponding to theto-be-generated insertion image may be determined according to the ratioof the target displacement to the slowdown multiple. In one example, thetarget displacement may include a displacement of each pixel in thetarget pixel between every two adjacent images. When the targetdisplacement is compared with the slowdown multiple to calculate theratio, the displacement of each pixel included in each targetdisplacement needs to be separately compared with the slowdown multipleto calculate reference motion vector data corresponding to each pixel inthe insertion image, so as to obtain reference motion vector datacorresponding to the insertion image.

For example, as shown in FIG. 9, if a motion vector of a pixel 11included in a target pixel in a current frame of image 41 is (0.5, 0.5),the motion vector represents that a replacement of a location of thepixel 11 in the current frame of image 41 is 0.5 with respect to alocation of the pixel 11 in a previous frame of image 42 in both an Xaxis direction and a Y axis direction. When the slowdown multiple is 2,the obtained ratio is 0.5/2=0.25, and then the ratio 0.25 is used asreference motion vector data of the pixel 11 in the target pixelincluded in the to-be-generated insertion image. For example, if theto-be-generated insertion image is an insertion image 56, when the ratio0.25 is obtained by means of calculation, it may be determined that adisplacement of a pixel 11 in the insertion image 56 is 0.25 withrespect to a displacement of the pixel 11 in a previous frame of image42 in the X axis direction and the Y axis direction.

After the ratio is acquired, the quantity of reference motion vectordata that needs to be generated in each interval may be determinedaccording to a formula in which x×N is less than y. The symbol “×”represents a product operation, where x is the ratio of the targetdisplacement to the slowdown multiple, y is the target displacement, andN is the maximum integer such that x×N is less than y.

Using the foregoing movement of the pixel 11 in the X axis direction asan example, the displacement of the pixel 11 in the X axis direction is0.5, that is, the displacement represented by the motion vector datacorresponding to the later displayed image is 0.5, and the targetdisplacement 0.5 is obtained. Because the corresponding slowdownmultiple is 2, in this case, the ratio is 0.25. Based on the formula inwhich x×N is less than y, and N is the maximum integer such that x×N isless than y, N is 1. That is, one piece of reference motion vector dataneeds to be generated in this interval. In this case, if the firstsequence of images includes six frames of images, (6−1)×1=5 pieces ofreference motion vector data need to be generated in total.

For another example, if the obtained target displacement is still 0.5,but the corresponding slowdown multiple is 3, the ratio is 0.16. Basedon the formula in which x×N is less than y, and N is the maximum integersuch that x×N is less than y, N is 3. That is, three pieces of referencemotion vector data need to be generated in this interval. In this case,if the first sequence of images includes six frames of images,(6−1)×3=15 pieces of reference motion vector data need to be generatedin total, and if the first sequence of images includes nine frames ofimages, (9−1)×3=24 pieces of reference motion vector data need to begenerated in total.

In addition, in another method of generating the reference motion vectordata whose quantity matches the slowdown multiple, the quantity of theto-be-newly-generated reference motion vector data may be directlydetermined according to the original quantity of frames of the firstsequence of images. Accordingly, if the quantity of the original framesof the first sequence of images is m, when it is determined that theslowdown multiple is n, a new sequence of images that is to besubsequently generated has a total of m×n frames of images, and a totalquantity of m×n−m frames of insertion images need to be generated. Inthis case, the quantity of reference motion vector data that needs to begenerated is m×n−m, and the quantity of insertion images that need to begenerated between every two adjacent frames of images may be(m×n−m)/(m−1).

In some cases, an integer cannot be obtained from (m×n−m)/(m−1). Toimprove this case, when it is detected that (m×n−m)/(m−1) is not aninteger, the quotient of (m×n−m)/(m−1) may be used as the quantity ofinsertion images that need to be generated between two adjacent framesof images, and the obtained remainder is randomly inserted between anytwo frames of images in the first sequence of images, or is inserted fordisplay after the last frame of image in the first sequence of images.

For example, if the first sequence of images includes six frames ofimages, when the slowdown multiple is 2, 6×2−6=6 frames of images needto be newly generated in total through calculation. In addition, 6/5 isfurther detected as not an integer, the quotient is 1 through adaptivecalculation, so that it is determined that in the six frames of images,the quantity of insertion images that need to be generated between everytwo adjacent frames of images is one frame, and the remaining one frameof image may be configured between any two of the six frames of imagesof the first sequence of images, or may be configured for generationafter the original six frames of images. For example, if the originalsix frames of images include a first frame of image, a second frame ofimage, a third frame of image, a fourth frame of image, a fifth frame ofimage, and a sixth frame of image, when it is determined to configurethe remaining one frame of image to be generated between the first frameof image and the second frame of image, insertion images to be generatedbetween the first frame of image and the second frame of image are twoframes, and an insertion image to be generated between the other twoadjacent frames of images is one frame.

Accordingly, after the quantity of insertion images to be generatedbetween every two adjacent images is determined, reference motion vectordata corresponding to the insertion image to be generated between everytwo adjacent images may still be determined in the foregoing manner.

In addition, the motion vector data corresponding to each frame of imagein the first sequence of images may be stored in multiple ways.

In one example, the motion vector data corresponding to each frame ofimage may be stored in a data table. In another example, the motionvector data corresponding to each frame of image may be carried bymaking a map. The map is an image that has the same contour as an imagein the sequence of images. For example, in FIG. 10, a left image 101 isa basic image including a sequence of images, a right image 102 is acorresponding map, and an object in the map has the same contour as anobject in the sequence of images. The basic image includes image contentcorresponding to each of multiple actions when a dynamic effect to beachieved is decomposed into the multiple actions. One block 60 in FIG.10 is corresponding to one action in the dynamic effect. In this case,when a sequence of images is generated based on the basic image in FIG.10, one block 60 may be corresponding to one frame of image in thesequence of images.

The basic image in FIG. 10 represents a dynamic effect that one smallerstar moves from the left of the picture to the right, while anotherlarger star moves from the bottom of the picture to the top. The firstsequence of images including multiple frames of images may be obtainedby cutting content in the basic image. In addition, a value of aspecified color channel of each pixel in the map is used forrepresenting a motion vector of a corresponding pixel in the firstsequence of images.

For example, as shown in FIG. 11, a pixel 70 in one frame of image in asequence of images and a pixel 80 in a map are corresponding pixels. Avalue of a specified color channel corresponding to the pixel 80 is usedfor representing a motion vector of the pixel 70. Similarly, a pixel 71in one frame of image in the sequence of images and a pixel 81 in themap are corresponding pixels, and a value of a specified color channelcorresponding to the pixel 81 is used for representing a motion vectorof the pixel 71. The specified color channel may be a red channel or agreen channel, where the red channel is used for representing adisplacement of the pixel in the X axis direction, and the green channelis used for representing a displacement of the pixel in the Y axisdirection.

S230. Generate, based on the first sequence of images and the referencemotion vector data, the insertion image that matches the slowdownmultiple.

It may be understood that, in this embodiment, motion vector datacorresponding to each frame of image in the first sequence of imagesrepresents a displacement of a target pixel in each frame of image withrespect to a target pixel in a previous frame of image. After thereference motion vector data corresponding to the to-be-generatedinsertion image is determined, the insertion image may be generatedbased on a pixel movement method.

As shown in FIG. 12, in one example, the generating, based on the firstsequence of images and the reference motion vector data, an insertionimage whose quantity matches the slowdown multiple includes:

S231. Acquire a target image corresponding to current reference motionvector data in a process of generating an insertion image correspondingto the current reference motion vector data, the target image being animage corresponding to an initial movement location of a target pixelcorresponding to the current reference motion vector data.

S232. Move a target pixel in a target image corresponding to each pieceof reference motion vector data according to reference motion vectordata corresponding to the target pixel, to obtain an insertion imagecorresponding to each piece of reference motion vector data; and use aset of insertion images corresponding to current reference motion vectordata as the insertion image that matches the slowdown multiple.

For example, as shown in FIG. 13, in content shown in FIG. 13, an image43 and an image 44 are two adjacent frames of images that form aninterval in the first sequence of images. An image 57, an image 58, andan image 59 are to-be-generated insertion images. When the image 57 isgenerated, reference motion vector data corresponding to the image 57 iscurrent reference motion vector data. In addition, it may be understoodthat, based on the foregoing content, reference motion vector datacorresponding to each of the to-be-generated images 57, 58, and 59 isdetermined based on a displacement represented by corresponding motionvector data of the image 44 and the slowdown multiple, and thedisplacement represented by the motion vector data of the image 44 is adisplacement with respect to that of the image 43. In a process ofgenerating the image 57, a target image corresponding to the referencemotion vector data corresponding to the image 57 is the image 43. When adisplacement represented by reference motion vector data correspondingto the image 58 is a displacement with respect to that of the image 57,and the image 58 is generated, the reference motion vector datacorresponding to the image 58 is current reference motion vector data,and a target image corresponding to the current reference motion vectordata is the image 57. Correspondingly, when the image 59 is generated,the target image corresponding to the current reference motion vectordata is the image 58.

In addition, in another example, after reference motion vector data isgenerated between every two adjacent images in the first sequence ofimages, a displacement of a target pixel represented by each piece ofreference motion vector data with respect to the first displayed imagein every two adjacent images may be determined. For example, as shown inFIG. 14, a motion vector of a pixel 11 included in a target pixel in animage 44 is (0.5, 0.5). When it is determined that a slowdown multipleis 3, it may be obtained that motion vectors corresponding to locationsof the pixel 11 in an image 57, an image 58, and an image 59 all are(0.16, 0.16, 0.16). This means that a displacement of the location ofthe pixel 11 in the image 58 with respect to a location of the pixel 11in an image 43 is 0.32, and a displacement of the location of the pixel11 in the image 59 with respect to the location of the pixel 11 in theimage 43 is 0.48. Correspondingly, a target image corresponding toreference motion vector data in every two adjacent images may beconfigured as the first displayed image in every two adjacent images.

After the target image is determined based on the foregoing manner, theinsertion image may be generated by moving the pixel. For example, stillreferring to FIG. 14, a motion vector (0, 0) is a motion vectorcorresponding to the pixel 11 in an image 41. When the image 57 isgenerated, the pixel 11 is moved by 0.16 pixel units as indicated by anarrow in the X axis direction and the Y axis direction to obtain alocation of the pixel 11 in the image 57. Accordingly, the location inthe image 57 that the target pixel in the image 43 can be moved to canbe obtained, and then image content corresponding to the image 57 can begenerated. When the image 58 is generated, the location of the targetpixel may continue to be moved based on the generated image 57, that is,the location of the target pixel may continue to be moved by 0.16 pixelunits as indicated by the arrow, or the location of the target pixel maybe moved by 0.32 pixel units based on the image 43, so as to generateimage content corresponding to the image 58.

As shown in the foregoing content, motion vector data represents adisplacement of a target pixel in an image. In this embodiment, a maphaving the same image content may be produced to carry motion vectordata corresponding to each pixel in each frame of image. A value of aspecified color channel of each pixel in the map is used forrepresenting a motion vector of a corresponding pixel in the firstsequence of images. In this case, a unit of the obtained displacement isa unit of a value of a color channel, and further, when an actualmovement distance of a target pixel in an image is determined, theobtained displacement needs to be multiplied by one conversion factor toobtain a movement distance in a unit of pixel. For example, if theconversion factor is s, when a displacement of a pixel obtained throughcalculation is 0.25, an actual movement distance of the pixel in theimage is 0.25×s pixel units. For example, in this embodiment, theconversion factor may be determined according to a bit color of theimage, and a larger bit color of the image corresponds to a largerconversion factor. A bit color of an image represents the quantity ofbits occupied by each color channel. For example, for a 24-bit colorimage, each color channel (a red channel, a green channel, and a bluechannel) occupies 8 bits.

S240. Insert the insertion image into a play sequence of the firstsequence of images to obtain a second sequence of images.

S250. Play the second sequence of images.

According to the image processing method provided in this embodiment,after the first sequence of images is produced, when the dynamic effectrepresented by the first sequence of images needs to be slowed down andthe visual effect needs to be maintained, the reference motion vectordata whose quantity matches the slowdown multiple may be generatedaccording to the motion vector data and the slowdown multiple, and thenmovement of the target pixel is performed based on the first sequence ofimages and the reference motion vector data, so as to generate theinsertion image whose quantity matches the slowdown multiple, so as toinsert the insertion image into the play sequence of the first sequenceof images, and obtain the second sequence of images that includes moreimages. Therefore, it is no longer necessary to produce, by using adevelopment tool, more images to be inserted into the first sequence ofimages, thereby reducing production costs.

FIG. 15 is a flowchart of an image processing method applied to a gameclient according to an embodiment of this application. The methodincludes the following steps:

S310. Display a configuration interface.

In this embodiment, a slowdown multiple may be pre-configured by adeveloper in a development phase of a first sequence of images, or maybe configured by a user in the game client for displaying a firstsequence of images. For example, the image processing method provided inthis embodiment may be executed by the game client, and the game clientmay be configured with a configuration interface. In this case, the gameclient may display the configuration interface after detecting a triggeroperation of the user, so that the user configures a slowdown multiplerequired by the user.

S320. Acquire a slowdown multiple based on the configuration interface.

In this embodiment, the configuration interface may allow the user toinput the slowdown multiple in multiple ways.

In one example, the configuration interface includes a first control anda second control that can slide on the first control, and acquiring adynamic effect parameter that is entered on the configuration interfaceincludes: acquiring a location of the second control after sliding inresponse to a touch operation; and using a value corresponding to thelocation as the slowdown multiple. For example, if the valuecorresponding to the location is 2, it may be obtained that the slowdownmultiple is 2.

For example, as shown in FIG. 16, FIG. 16 is a game interface 99 of agame client. In the game interface 99, a configuration interface 98 maybe displayed in response to an operation of a user, and a first control97 and a second control 96 that can slide on the first control 97 aredisplayed in the configuration interface 98. The user may drag thesecond control 96 to slide on the first control 97, and differentlocations on the first control 97 are corresponding to different values.The game client may detect and acquire the location of the secondcontrol after sliding in response to the touch operation, and use thevalue corresponding to the location as the inputted slowdown multiple.

In another example, the game client can directly display an input boxand an OK control in the configuration interface, so that the user canmanually input the required slowdown multiple in the input box, and thenclick the OK control. After detecting that the OK control is touched,the game client uses the data acquired from the input box as theslowdown multiple.

An electronic device installed with the game client configures a specialfile storage area for the game client to store a file corresponding tothe game client. In this case, a configuration file corresponding to thegame client is correspondingly stored in the file storage area, and theconfiguration file may record related configuration information of thegame client. For example, a configured picture resolution, a configuredsound effect, a configured operation method, and correspondingly aslowdown multiple may also be configured. After the slowdown multiple isacquired, the game client may further store the acquired slowdownmultiple in the configuration file, so as to update a previously storedslowdown multiple. For example, if the originally stored slowdownmultiple in the configuration file is 2, after a newly inputted slowdownmultiple is detected, and it is recognized that the newly inputtedslowdown multiple is different from 2, for example, 3, the game clientupdates the slowdown multiple in the configuration file from 2 to 3. Inthis case, the slowdown multiple stored in the configuration file may beunderstood as a slowdown multiple used in a process of generating aninsertion image.

S330. Acquire a first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of images.

S340. Generate, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that matches theslowdown multiple.

S350. Insert the insertion image into a play sequence of the firstsequence of images to obtain a second sequence of images.

S360. Play the second sequence of images.

In this embodiment, S310 and S320 may be separately performed indifferent phases with S350. It may be understood that the first sequenceof images represents a dynamic effect. For example, the first sequenceof images represents a dynamic effect in which an object flies from oneend to another end. A dynamic effect represented by the second sequenceof images is the same as content represented by the first sequence ofimages, and the difference mainly lies in that play duration of thedynamic effect represented by the second sequence of images is differentfrom that of the dynamic effect represented by the first sequence ofimages. Then, if the first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of imagesneed to be acquired to generate the second sequence of images only whenthe dynamic effect corresponding to the second sequence of images needsto be loaded for display, the second sequence of images may be displayedwith a sense of delay.

It may be understood that each frame of image in the first sequence ofimages has been produced in advance. However, to perform slowdown playprocessing, a newly generated insertion image needs to be obtained basedon real-time rendering of the first sequence of images. In thisrendering process, a processing resource (a computing resource of a CPUor a computing resource of a GPU) of the electronic device in which thegame client is located needs to be consumed. If a current processingresource is tight, rendering efficiency of the insertion image is nothigh, and consequently, the second sequence of images is displayed witha sense of delay.

In one example of improving the problem, when detecting that theslowdown multiple changes, the game client may generate, based on themotion vector data, the first sequence of images, and the slowdownmultiple, an insertion image whose quantity matches the slowdownmultiple, even if it is not currently in a scene in which the secondsequence of images needs to be loaded, so as to generate the secondsequence of images, so that the second sequence of images can bedirectly played when the second sequence of images needs to bedisplayed, thereby improving real-time playing performance of thedynamic effect.

According to the image processing method provided in this embodiment, inaddition to reducing production costs and shortening time for producingthe dynamic effect, in this embodiment, the slowdown multiple may beinputted in real time on the configuration interface, so that a playspeed of the dynamic effect to be displayed by the first sequence ofimages is controlled in real time, thereby improving interaction in adynamic effect display process, and further improving user experience.

FIG. 17 is a flowchart of an image processing method applied to a gameclient according to an embodiment of this application. The methodincludes the following steps:

S410. Acquire a slowdown multiple based on an external data interface.

Acquiring the slowdown multiple based on the external data interface maybe understood as receiving the slowdown multiple transmitted by usingthe external data interface.

In one example, a plug-in may be running on an electronic device inwhich the game client is located to configure configuration informationof multiple game clients in a centralized manner, so that a user doesnot need to separately configure the configuration information of themultiple game clients in sequence, thereby reducing operation repetitionof the user and improving user experience.

For example, a game client that executes the image processing methodprovided in this embodiment is a client A. In addition to the client A,a client B and a client C are installed in an electronic device in whicha plug-in A is configured. The plug-in A may communicate with the clientA, the client B, and the client C in a process communication. In thiscase, the user can configure a game interface resolution, a game soundeffect, a slowdown multiple of a dynamic effect, and the like in theplug-in A. After acquiring the game interface resolution, the game soundeffect, and the slowdown multiple of the dynamic effect that areconfigured by the user, the plug-in A may synchronize the information asconfiguration information to external data interfaces of the client A,the client B, and the client C in the process communication, so that theclient A, the client B, and the client C acquire, by using therespective external data interfaces, the configuration informationtransmitted by the plug-in A, so as to update configuration informationin a configuration file.

S420. Acquire a first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of images.

S430. Generate, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that matches theslowdown multiple.

S440. Insert the insertion image into a play sequence of the firstsequence of images to obtain a second sequence of images.

S450. Play the second sequence of images.

According to the image processing method provided in this embodiment, inaddition to reducing production costs and shortening time for producingthe dynamic effect, in this embodiment, the slowdown multiple may beinputted in real time by using the external data interface correspondingto the game client, so that a play speed of the dynamic effect to bedisplayed by the first sequence of images can be controlled in realtime, thereby improving flexibility of slowdown multiple configurationin a dynamic effect display process, and further improving userexperience.

In summary, the image processing method provided in the embodiments ofthis application may be implemented by a terminal/server alone; or maybe implemented by the terminal and the server through cooperation. Thefollowing describes a solution in which image processing is implementedby the terminal and the server through cooperation.

The terminal collects a request for slowing down playing the firstsequence of images (including the slowdown multiple and the firstsequence of images), and sends the request to the server. Afterreceiving the request, the server acquires the first sequence of imagesand the motion vector data, generates, based on the motion vector data,the first sequence of images, and the slowdown multiple, the insertionimage whose quantity matches the slowdown multiple, inserts theinsertion image into the play sequence of the first sequence of imagesto obtain the second sequence of images, and sends the second sequenceof images to the terminal, so that the terminal displays the secondsequence of images. Therefore, after the first sequence of images isproduced, when the dynamic effect represented by the first sequence ofimages needs to be slowed down and the visual effect needs to bemaintained, the insertion image is produced according to the motionvector data corresponding to each frame of image in the first sequenceof images, and inserted into the play sequence of the first sequence ofimages, so as to obtain the second sequence of images that includes moreimages. In this way, a development tool is not required to be used forproducing more images to be inserted into the first sequence of images,so as to reduce production costs and shorten time for producing thedynamic effect, thereby reducing development difficulty and improvingdevelopment efficiency.

FIG. 18 is a flowchart of an image processing method according to anembodiment of this application. The method includes the following steps:

S510. Generate an original material.

Before a first sequence of images is generated, a basic sequence ofimages may be produced in advance as an original material, and then someimages are selected from the basic sequence of images as the firstsequence of images.

S520. Define the quantity and precision of sequence of images to begenerated.

The precision may be understood as a resolution of an image.

For example, in a basic sequence of images with a fixed total pixelincluded, if more sequence of images are to be obtained based on thebasic sequence of images, a resolution of each frame of image in thesequence of images is low. For example, for a basic sequence of imageswith a total of 2048×2048 pixels, if the basic sequence of imagesincludes an 8×8 sequence of images (64 frames in total), an obtainedpixel corresponding to a single frame of image is 256×256. If the basicsequence of images includes a 16×16 sequence of images (256 frames), anobtained pixel corresponding to a single frame of image is 128×128.

In this case, a resolution of a single frame of image may be definedaccording to a requirement, so as to obtain the quantity of frames ofimages included in the first sequence of images.

S530. Generate a first sequence of images in a first image generationenvironment.

S540. Generate, in the first image generation environment, motion vectordata corresponding to each frame of image in the first sequence ofimages.

In this embodiment, S540 may be performed after S530, or may beperformed at the same time as S530.

S550. Input the first sequence of images and the motion vector data intoa second image generation environment, and output material data thatcarries the first sequence of images, the motion vector data, and aslowdown multiple.

In one example, a scalar parameter may be configured in the materialdata to store the slowdown multiple, so as to produce a materialtemplate. The scalar parameter may facilitate an external program toidentify a parameter for storing the slowdown multiple, and then theslowdown multiple is accessed or modified by using the external program.In addition, a dynamic parameter may be further configured in thematerial data. The dynamic parameter may be used for invoking theslowdown multiple in a cascade (particle editor) system in the secondimage generation environment while producing a particle effect.

When a scalar parameter is configured in the material data, a parameterin the scalar parameter about the slowdown multiple may be updated, andthe slowdown multiple in the material data is updated, so that a playrhythm of a dynamic effect represented by the first sequence of imagesis dynamically controlled in real time.

S560. Read the material data, so as to acquire the first sequence ofimages and the motion vector data corresponding to each frame of imagein the first sequence of images.

S570. Read the material data to acquire the slowdown multiple.

S580. Generate, based on the motion vector data, the first sequence ofimages, and the slowdown multiple, an insertion image that matches theslowdown multiple.

S590. Insert the insertion image into a play sequence of the firstsequence of images to obtain a second sequence of images.

S591. Play the second sequence of images.

The following further describes, by using the accompanying drawings, theimage processing method provided in this embodiment to process a dynamiceffect in a game scene to obtain a dynamic effect of a super slow motiontype.

FIG. 19 shows a game scene of an instant combat-type game, and anexplosion effect after a bomb is thrown out is played in the game scene(a location indicated by an arrow in the figure).

For example, in an explosion effect of a common type, a frame rate isgenerally lower than a frame rate of an explosion effect of a super slowaction type, which means that the explosion effect of the common type iscompleted in a very short time. However, the explosion effect of thesuper slow action type has longer play duration, so that the wholeexplosion effect changes gently.

As shown in FIG. 20, images in the upper row in FIG. 20 are a firstsequence of images that represents an explosion effect of a common type,and images in the lower row are a part of a second sequence of imagesthat is obtained through processing by using the image processing methodprovided in the embodiments of this application. For example, an imagecorresponding to a moment t1 and an image corresponding to a moment t2in the upper row of images may be used as an interval, and then aninsertion image in this interval is obtained based on the solutionprovided in the foregoing embodiment. Similarly, an insertion image inan interval between the image corresponding to the moment t2 and animage corresponding to a moment t3 and an insertion image in an intervalbetween the image corresponding to the moment t3 and an imagecorresponding to a moment t4 may be obtained, so that a second sequenceof images that represents an explosion effect of a super slow actiontype is obtained.

The upper row shows effect images of the explosion effect of the commontype at moments t1, t2, t3, and t4 after the explosion starts, and thelower row shows effect images of the explosion effect of the super slowaction type at moments t1, t2, t3, and t4 after the explosion starts. Itmay be seen from FIG. 20 that the explosion effect of the common typerepresented by the first sequence of images is about to end when it isplayed to the moment t4, and the explosion effect of the super slowaction type represented by the second sequence of images at the momentt1 is still not significantly different from the explosion effect of thesuper slow action type at the moment t4. In this case, the explosioneffect of the super slow action type may undergo transformation of moreframes of images after the moment t4 before changing to the image of theexplosion effect of the common type at the moment t4 in the upper row,so that the whole explosion effect changes more smoothly. The moreframes of images may include the insertion image acquired based on thesolution provided in the embodiments of this application.

As shown in FIG. 21, if a first sequence of images includes 64 frames ofimages (each small grid represents one frame of image), FIG. 21 shows acomparison effect between the quantity of images that need to beproduced by using the solution provided in the embodiments of thisapplication and the quantity of images that need to be produced in arelated technology when a slowdown multiple is 5. A dashed line box 94shows the quantity of images that need to be correspondingly produced byusing the solution provided in the embodiments of this application.Because the insertion image in the solution provided in the embodimentsof this application is generated through calculation by using motionvector data, no more images need to be produced by using a developmenttool. Therefore, a visual effect of slowing down by 5 times can beimplemented by using only 64 frames of images included in the firstsequence of images that is originally produced by using the developmenttool and a map (also 64 frames) corresponding to each frame of image inthe first sequence of images. A dashed line box 95 shows the quantity ofimages that need to be produced in the related technology in a case of aslowdown multiple 5. Because all frames of images in the relatedtechnology need to be produced by using the development tool, thequantity of frames that need to be produced in a case of slowing down by5 times is obviously more than the quantity of images in the dashed linebox 94.

In this embodiment, in one example, S510 to S590 may be performed by acomputer on which a first image generation environment and a secondimage generation environment are installed, and S591 may be performed bya game client.

For example, when the dynamic effect needs to be loaded, the game clientmay start to read material data to acquire a first sequence of imagesand motion vector data corresponding to each frame of image in the firstsequence of images. For example, the dynamic effect represented by thefirst sequence of images is an explosion effect of a bomb in a gamescene. When the game client needs to display the explosion effect, thegame client may read material data corresponding to the explosion effectto acquire the first sequence of images corresponding to the explosioneffect and the motion vector data corresponding to each frame of imagein the first sequence of images.

For example, during startup, the game client may start to acquire thefirst sequence of images and the motion vector data corresponding toeach frame of image in the first sequence of images, thereby furtherimproving display efficiency of a second sequence of images, so that thesecond sequence of images can be displayed more immediately, therebyreducing a display delay of the dynamic effect. For example, anexplosion effect of a bomb represented by the first sequence of imagesis used. The explosion effect is triggered only after a bomb is thrownout by a game player. To facilitate display of the explosion effectwithout delay, the game client may start to acquire the first sequenceof images and the motion vector data corresponding to each frame ofimage in the first sequence of images at a resource loading stage in astartup process or a user login stage, so as to generate, based on themotion vector data, the first sequence of images, and a slowdownmultiple, an insertion image whose quantity matches the slowdownmultiple, so as to complete generation of the second sequence of imagesbefore entering a scene in which the dynamic effect needs to be played.

In another implementation, S510 to S550 may be performed by the computerin which the first image generation environment and the second imagegeneration environment are installed, S560 to S580 may be performed by aserver, and S591 may be performed by the game client. Accordingly,generated material data may be pre-stored in the server. When the gameclient needs to play a dynamic effect corresponding to the secondsequence of images, the server reads the material data to acquire themotion vector data, the first sequence of images, and the slowdownmultiple to generate an insertion image whose quantity matches theslowdown multiple, and then inserts the insertion image into a playsequence of the first sequence of images to obtain the second sequenceof images, and then the server sends the second sequence of images tothe game client, so that the game client displays the second sequence ofimages.

When S591 is performed, the second sequence of images may be displayedby a client that generates the second sequence of images, or may be sentby the client that generates the second sequence of images to a targetclient, and the target client displays the second sequence of images.For example, if there is an electronic device A and an electronic deviceB in the same local area network, and the same game client is installedin the electronic device A and the electronic device B, after the gameclient in the electronic device A first triggers a game scene andgenerates a second sequence of images corresponding to a dynamic effectA in the game scene, the electronic device A may send the generatedsecond sequence of images to the game client of the electronic device Bfor storage. In this case, when the game client in the electronic deviceB enters the game scene later and needs to load the dynamic effect A,the second sequence of images sent by the electronic device A may bedirectly read, so that the game client in the electronic device B doesnot repeatedly generate the second sequence of images.

According to the image processing method provided in this embodiment,after the first sequence of images is produced, when the dynamic effectrepresented by the first sequence of images needs to be slowed down andthe visual effect needs to be maintained, the insertion image may beproduced according to the motion vector data corresponding to each frameof image in the first sequence of images, and inserted into the playsequence of the first sequence of images, to obtain the second sequenceof images that includes more images. Therefore, it is no longernecessary to produce, by using a development tool, more images to beinserted into the first sequence of images, thereby reducing productioncosts. In addition, in this embodiment, the slowdown multiple, the firstsequence of images, and the motion vector data may be configured in thegenerated material data, and subsequently, the first sequence of images,the motion vector data, and the slowdown multiple may be collectivelyacquired by reading the material data, thereby improving efficiency ofacquiring the dynamic data.

Referring to FIG. 22, an embodiment of this application provides animage processing apparatus 600, and the apparatus 600 includes:

a data acquiring unit 610, configured to acquire a first sequence ofimages and motion vector data corresponding to each frame of image inthe first sequence of images;

an image generation unit 620, configured to generate, based on themotion vector data, the first sequence of images, and a slowdownmultiple, an insertion image that matches the slowdown multiple, aquantity of insertion images corresponding to the slowdown multiple;

an image configuration unit 630, configured to insert the insertionimage into a play sequence of the first sequence of images to obtain asecond sequence of images; and

an image play unit 640, configured to play the second sequence ofimages.

According to the image processing apparatus provided in this embodiment,after the first sequence of images and the motion vector data areacquired, the insertion image whose quantity matches the slowdownmultiple is generated based on the motion vector data, the firstsequence of images, and the slowdown multiple, and the insertion imageis inserted into the play sequence of the first sequence of images toobtain the second sequence of images. Therefore, after the firstsequence of images is produced, when the dynamic effect represented bythe first sequence of images needs to be slowed down and the visualeffect needs to be maintained, the insertion image is produced accordingto the motion vector data corresponding to each frame of image in thefirst sequence of images, and inserted into the play sequence of thefirst sequence of images, so as to obtain the second sequence of imagesthat includes more images. In this way, a development tool is notrequired to be used for producing more images to be inserted into thefirst sequence of images, so as to reduce production costs.

In one example, as shown in FIG. 23, the image generation unit 620includes: a vector data generation subunit 621, configured to generate,based on the motion vector data and the slowdown multiple, referencemotion vector data that matches the slowdown multiple, a quantity ofreference motion vector data corresponding to the slowdown multiple; andan image generation execution subunit 622, configured to generate, basedon the first sequence of images and the reference motion vector data,the insertion image that matches the slowdown multiple.

Accordingly, the vector data generation subunit 621 is furtherconfigured to acquire a target displacement, the target displacementbeing a displacement represented by motion vector data corresponding toa later displayed image, and the later displayed image being an imagewith a later play order in every two adjacent images in the firstsequence of images; acquire a ratio of the target displacement to theslowdown multiple; obtain a quantity of insertion images between everytwo adjacent images based on the slowdown multiple; and use the ratio asreference motion vector data corresponding to the insertion imagebetween every two adjacent images, and use the reference motion vectordata corresponding to the insertion image as the reference motion vectordata that matches the slowdown multiple.

The image generation execution subunit 622 is further configured to:acquire a target image corresponding to current reference motion vectordata in a process of generating an insertion image corresponding to thecurrent reference motion vector data, the target image being an imagecorresponding to an initial location of a target pixel corresponding tothe current reference motion vector data; move a target pixel in atarget image corresponding to each piece of reference motion vector dataaccording to reference motion vector data corresponding to the targetpixel, to obtain an insertion image corresponding to each piece ofcurrent reference motion vector data; and use a set of insertion imagescorresponding to the current reference motion vector data as theinsertion image that matches the slowdown multiple.

In one example, as shown in FIG. 24, the apparatus 600 further includesa parameter configuration unit 650, configured to display aconfiguration interface; acquire a slowdown multiple inputted in theconfiguration interface; and use the inputted slowdown multiple as theslowdown multiple. For example, the configuration interface includes afirst control and a second control that can slide on the first control.In this case, the parameter configuration unit 650 is further configuredto acquire a location of the second control after sliding in response toa touch operation; and use a slowdown multiple corresponding to thelocation as the inputted slowdown multiple.

In another example, the parameter configuration unit 650 is furtherconfigured to acquire a slowdown multiple that is inputted by anexternal application program by using an external data interface; anduse the transmitted slowdown multiple as the slowdown multiple.

In one example, as shown in FIG. 25, the apparatus 600 further includesan initial image generation unit 660, configured to generate the firstsequence of images in a first image generation environment; generate, inthe first image generation environment, motion vector data correspondingto each frame of image in the first sequence of images; and input thefirst sequence of images and the motion vector data into a second imagegeneration environment, and output material data that carries the firstsequence of images, the motion vector data, and the slowdown multiple.Accordingly, the data acquiring unit 610 is further configured to readthe material data, so as to acquire the first sequence of images and themotion vector data corresponding to each frame of image in the firstsequence of images, and read the material data to acquire the slowdownmultiple.

The apparatus embodiments in this application correspond to theforegoing method embodiments. For a specific principle in the apparatusembodiments, refer to the content in the foregoing method embodiments.Details are not described herein again.

The term unit (and other similar terms such as subunit, module,submodule, etc.) in this disclosure may refer to a software unit, ahardware unit, or a combination thereof. A software unit (e.g., computerprogram) may be developed using a computer programming language. Ahardware unit may be implemented using processing circuitry and/ormemory. Each unit can be implemented using one or more processors (orprocessors and memory). Likewise, a processor (or processors and memory)can be used to implement one or more units. Moreover, each unit can bepart of an overall unit that includes the functionalities of the unit.

The following describes an electronic device provided in thisapplication with reference to FIG. 26.

Referring to FIG. 26, based on the foregoing image processing method, anembodiment of this application further provides an electronic device 200that can perform the foregoing image processing method. The electronicdevice 200 includes: a processor 102, a memory 104, and a network module106. The memory 104 stores a program that can perform the content in theforegoing embodiment, and the processor 102 can execute the programstored in the memory 104.

The processor 102 may include one or more cores used for processingdata, and message matrix units. The processor 102 connects parts of theentire electronic device 200 by using various interfaces and lines, andperforms various functions of the electronic device 200 and processesdata by operating or executing an instruction, a program, a code set oran instruction set stored in the memory 104 and invoking the data storedin the memory 104. Optionally, the processor 102 may be implemented byusing at least one hardware form of a digital signal processor (DSP), afield-programmable gate array (FPGA), and a programmable logic array(PLA). The processor 102 may be integrated with one or a combination ofa central processing unit (CPU), a graphics processing unit (GPU), amodem, and the like. The CPU mainly processes an operating system, auser interface, an application program, and the like. The GPU isconfigured to render and draw display content. The modem is configuredto process wireless communication. The modem processor may alternativelynot be integrated in the processor 102, but may be independentlyimplemented by a communication chip.

The memory 104 may include a random access memory (RAM), or may includea read only memory (ROM). The memory 104 may be configured to storeinstructions, programs, code, code sets, or instruction sets. The memory104 may include a program storage area and a data storage area. Theprogram storage area may store an instruction used for implementing anoperating system, an instruction used for implementing at least onefunction (for example, a touch function, a sound playback function, andan image playback function), an instruction used for implementing thefollowing method embodiments, or the like. The data storage area mayfurther store data (such as an address book, audio and video data, andchat record data) created by the terminal 100 in use.

The network module 106 is configured to receive and send anelectromagnetic wave, and implement mutual conversion between theelectromagnetic wave and an electric signal, so as to communicate with acommunication network or another device, for example, an audio playbackdevice. The network module 106 may include various existing circuitelements for performing these functions, such as an antenna, an RFtransceiver, a digital signal processor, a cipher/decipher chip, asubscriber identity module (SIM) card, and a memory. The network module106 may communicate with various networks such as the Internet, anintranet and a wireless network, or communicate with other devicesthrough a wireless network. The wireless network may include a cellulartelephone network, a wireless local area network, or a metropolitan areanetwork. For example, the network module 106 may exchange informationwith a base station.

FIG. 27 shows a schematic block diagram of a computer-readable storagemedium according to an embodiment of this application. Acomputer-readable medium 1100 stores program code, which may be invokedby a processor to perform the method described in the foregoing methodembodiments.

The computer-readable medium 1100 may be an electronic memory such as aflash memory, an electrically erasable programmable read-only memory(EEPROM), an EPROM, a hard disk or a ROM. Optionally, thecomputer-readable storage medium 1100 includes a non-transitorycomputer-readable storage medium. The computer-readable storage medium1100 has storage space of program code 1110 for performing any methodstep in the foregoing method. The program code may be read from one ormore computer program products or be written to the one or more computerprogram products. For example, the program code 1110 may be compressedin an appropriate form.

In conclusion, according to the image processing method and apparatus,the electronic device, and the storage medium that are provided in thisapplication, after the first sequence of images and the motion vectordata are acquired, the insertion image whose quantity matches theslowdown multiple is generated based on the motion vector data, thefirst sequence of images, and the slowdown multiple, and the insertionimage is inserted into the play sequence of the first sequence of imagesto obtain the second sequence of images. Therefore, after the firstsequence of images is produced, when the dynamic effect represented bythe first sequence of images needs to be slowed down and the visualeffect needs to be maintained, the insertion image is produced accordingto the motion vector data corresponding to each frame of image in thefirst sequence of images, and inserted into the play sequence of thefirst sequence of images, so as to obtain the second sequence of imagesthat includes more images. In this way, a development tool is notrequired to be used for producing more images to be inserted into thefirst sequence of images, so as to reduce production costs and shortentime for producing the dynamic effect.

In addition, because the quantity of images that need to be produced byusing the development tool in the previous production process isreduced, memory space that needs to be occupied is also reduced, andutilization of storage space is improved.

The term module, and other similar terms such as subunit, unit,submodule, etc., in this disclosure may refer to a software unit, ahardware unit, or a combination thereof. A software module (e.g.,computer program) may be developed using a computer programminglanguage. A hardware module may be implemented using processingcircuitry and/or memory. Each module can be implemented using one ormore processors (or processors and memory). Likewise, a processor (orprocessors and memory) can be used to implement one or more modules.Moreover, each unit can be part of an overall module that includes thefunctionalities of the module.

In some embodiments, the computer-readable storage medium may include: aread-only memory (ROM), a random access memory (RAM), a solid statedrive (SSD), an optical disc, or the like. The RAM may include aresistance random access memory (ReRAM) and a dynamic random accessmemory (DRAM). The sequence numbers of the foregoing embodiments of thisapplication are merely for description purpose but do not imply thepreference among the embodiments.

Finally, the foregoing embodiments are merely used for describing thetechnical solutions of this application, but are not intended to limitthis application. Although this application is described in detail withreference to the foregoing embodiments, persons of ordinary skill in theart are to understand that they may still make modifications to thetechnical solutions described in the foregoing embodiments or makeequivalent replacements to some technical features thereof, withoutdeparting from the spirit and scope of the technical solutions of theembodiments of this application.

What is claimed is:
 1. An image processing method, performed by anelectronic device, the method comprising: acquiring a first sequence ofimages and motion vector data corresponding to each frame of image inthe first sequence of images; generating, based on the motion vectordata, the first sequence of images, and a slowdown multiple, aninsertion image that correspondences to the slowdown multiple, aquantity of insertion images corresponding to the slowdown multiple;inserting the insertion image into a play sequence of the first sequenceof images to obtain a second sequence of images; and playing the secondsequence of images.
 2. The method according to claim 1, wherein thegenerating, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that correspondencesto the slowdown multiple comprises: generating, based on the motionvector data and the slowdown multiple, reference motion vector data thatcorrespondences to the slowdown multiple, a quantity of reference motionvector data corresponding to the slowdown multiple; and generating,based on the first sequence of images and the reference motion vectordata, the insertion image that correspondences to the slowdown multiple.3. The method according to claim 2, wherein the generating, based on themotion vector data and the slowdown multiple, reference motion vectordata that correspondences to the slowdown multiple comprises: acquiringa target displacement, the target displacement being a displacementrepresented by motion vector data corresponding to a later displayedimage, and the later displayed image being an image with a later playorder in every two adjacent images in the first sequence of images;acquiring a ratio of the target displacement to the slowdown multiple;obtaining a quantity of insertion images between every two adjacentimages based on the slowdown multiple; and using the ratio as referencemotion vector data corresponding to the insertion image between everytwo adjacent images, and using the reference motion vector datacorresponding to the insertion image as the reference motion vector datathat correspondences to the slowdown multiple.
 4. The method accordingto claim 2, wherein the generating, based on the first sequence ofimages and the reference motion vector data, the insertion image thatcorrespondences to the slowdown multiple comprises: acquiring a targetimage corresponding to current reference motion vector data in a processof generating an insertion image corresponding to the current referencemotion vector data, the target image being an image corresponding to aninitial location of a target pixel corresponding to the currentreference motion vector data; moving a target pixel in a target imagecorresponding to each piece of current reference motion vector dataaccording to reference motion vector data corresponding to the targetpixel, to obtain an insertion image corresponding to each piece ofcurrent reference motion vector data; and using a set of insertionimages corresponding to the current reference motion vector data as theinsertion image that correspondences to the slowdown multiple.
 5. Themethod according to claim 1, wherein before the generating, based on themotion vector data, the first sequence of images, and a slowdownmultiple, an insertion image that correspondences to the slowdownmultiple, the method further comprises: displaying a configurationinterface; and acquiring the slowdown multiple based on theconfiguration interface.
 6. The method according to claim 5, wherein theconfiguration interface comprises a first control and a second controlthat slides relative to the first control; and the acquiring theslowdown multiple based on the configuration interface comprises:acquiring a location of the second control after sliding in response toa touch operation; and using a value corresponding to the location asthe slowdown multiple.
 7. The method according to claim 1, whereinbefore the generating, based on the motion vector data, the firstsequence of images, and a slowdown multiple, an insertion image thatcorrespondences to the slowdown multiple, the method further comprises:acquiring the slowdown multiple based on an external data interface. 8.The method according to claim 1, wherein the motion vector data is amotion vector carried in a map whose image content corresponds to thefirst sequence of images, and a value of a specified color channel ofeach pixel in the map is used for representing a motion vector of acorresponding pixel in the first sequence of images.
 9. An imageprocessing apparatus, comprising a processor and a memory, one or moreprograms being stored in the memory and configured to be executed by theprocessor to: acquire a first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of images;generate, based on the motion vector data, the first sequence of images,and a slowdown multiple, an insertion image that correspondences to theslowdown multiple, a quantity of insertion images corresponding to theslowdown multiple; insert the insertion image into a play sequence ofthe first sequence of images to obtain a second sequence of images; andplay the second sequence of images.
 10. The apparatus according to claim9, wherein the processor is further configured to: generate, based onthe motion vector data and the slowdown multiple, reference motionvector data that correspondences to the slowdown multiple, a quantity ofreference motion vector data corresponding to the slowdown multiple; andgenerate, based on the first sequence of images and the reference motionvector data, the insertion image that correspondences to the slowdownmultiple.
 11. The apparatus according to claim 10, wherein the processoris further configured to acquire a target displacement, the targetdisplacement being a displacement represented by motion vector datacorresponding to a later displayed image, and the later displayed imagebeing an image with a later play order in every two adjacent images inthe first sequence of images; acquire a ratio of the target displacementto the slowdown multiple; obtain a quantity of insertion images betweenevery two adjacent images based on the slowdown multiple; and use theratio as reference motion vector data corresponding to the insertionimage between every two adjacent images, and use the reference motionvector data corresponding to the insertion image as the reference motionvector data that correspondences to the slowdown multiple.
 12. Theapparatus according to claim 10, wherein the processor is furtherconfigured to: acquire a target image corresponding to current referencemotion vector data in a process of generating an insertion imagecorresponding to the current reference motion vector data, the targetimage being an image corresponding to an initial location of a targetpixel corresponding to the current reference motion vector data; move atarget pixel in a target image corresponding to each piece of currentreference motion vector data according to reference motion vector datacorresponding to the target pixel, to obtain an insertion imagecorresponding to each piece of current reference motion vector data; anduse a set of insertion images corresponding to the current referencemotion vector data as the insertion image that correspondences to theslowdown multiple.
 13. The apparatus according to claim 9, wherein theprocessor is further configured to display a configuration interface;and acquire the slowdown multiple based on the configuration interface.14. A non-transitory computer-readable storage medium, storing programcode, when run by a processor, performing the method comprising:acquiring a first sequence of images and motion vector datacorresponding to each frame of image in the first sequence of images;generating, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that correspondencesto the slowdown multiple, a quantity of insertion images correspondingto the slowdown multiple; inserting the insertion image into a playsequence of the first sequence of images to obtain a second sequence ofimages; and playing the second sequence of images.
 15. Thecomputer-readable storage medium according to claim 14, wherein thegenerating, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that correspondencesto the slowdown multiple comprises: generating, based on the motionvector data and the slowdown multiple, reference motion vector data thatcorrespondences to the slowdown multiple, a quantity of reference motionvector data corresponding to the slowdown multiple; and generating,based on the first sequence of images and the reference motion vectordata, the insertion image that correspondences to the slowdown multiple.16. The computer-readable storage medium according to claim 15, whereinthe generating, based on the motion vector data and the slowdownmultiple, reference motion vector data that correspondences to theslowdown multiple comprises: acquiring a target displacement, the targetdisplacement being a displacement represented by motion vector datacorresponding to a later displayed image, and the later displayed imagebeing an image with a later play order in every two adjacent images inthe first sequence of images; acquiring a ratio of the targetdisplacement to the slowdown multiple; obtaining a quantity of insertionimages between every two adjacent images based on the slowdown multiple;and using the ratio as reference motion vector data corresponding to theinsertion image between every two adjacent images, and using thereference motion vector data corresponding to the insertion image as thereference motion vector data that correspondences to the slowdownmultiple.
 17. The computer-readable storage medium according to claim15, wherein the generating, based on the first sequence of images andthe reference motion vector data, the insertion image thatcorrespondences to the slowdown multiple comprises: acquiring a targetimage corresponding to current reference motion vector data in a processof generating an insertion image corresponding to the current referencemotion vector data, the target image being an image corresponding to aninitial location of a target pixel corresponding to the currentreference motion vector data; moving a target pixel in a target imagecorresponding to each piece of current reference motion vector dataaccording to reference motion vector data corresponding to the targetpixel, to obtain an insertion image corresponding to each piece ofcurrent reference motion vector data; and using a set of insertionimages corresponding to the current reference motion vector data as theinsertion image that correspondences to the slowdown multiple.
 18. Thecomputer-readable storage medium according to claim 14, wherein beforethe generating, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that correspondencesto the slowdown multiple, the method further comprises: displaying aconfiguration interface; and acquiring the slowdown multiple based onthe configuration interface.
 19. The computer-readable storage mediumaccording to claim 18, wherein the configuration interface comprises afirst control and a second control that slides relative to the firstcontrol; and the acquiring the slowdown multiple based on theconfiguration interface comprises: acquiring a location of the secondcontrol after sliding in response to a touch operation; and using avalue corresponding to the location as the slowdown multiple.
 20. Thecomputer-readable storage medium according to claim 14, wherein beforethe generating, based on the motion vector data, the first sequence ofimages, and a slowdown multiple, an insertion image that correspondencesto the slowdown multiple, the method further comprises: acquiring theslowdown multiple based on an external data interface.